package com.ttg.common.sftp;

public enum ProxyTypeEnum {

    /**
     * 默认不走协议
     */
    NORMAL("NORMAL"),
    /**
     * http
     */
    HTTP("HTTP"),
    /**
     * sock4
     */
    SOCKS4("SOCK4"),
    /**
     * sock5
     */
    SOCKS5("SOCK5");

    private final String value;

    ProxyTypeEnum(String value) {
        this.value = value;
    }

    public static ProxyTypeEnum getByCode(String value){
        for (ProxyTypeEnum v : ProxyTypeEnum.values()) {
            if(v.getValue().equals(value)){
                return v;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

}
